##########################################################################
#
## Filename: Makefile 
#
## Purpose: top level make file for tuxmason
#
## Copyright (c) 2010 - 2012 Mwanguhya Daniel Murungi <tuxmason@gmail.com>
#
##########################################################################

# Include user preferences 
include conf/config.inc
include conf/Makefile.config

all: base misc 

base: embryo cocoon

base-dirs: config
	@if [ ! -d $(TCBUILDROOT) ]; then mkdir -pv $(TCBUILDROOT); fi
	@if [ ! -d $(PKGLOGDIR) ]; then mkdir -pv $(PKGLOGDIR); fi

embryo: base-dirs 
	make -C packages/tmp

cocoon:
	make -C packages/core

misc: 
	make -C packages/misc

distclean:
	@if [ -d $(TCBUILDROOT) ]; then rm -rf $(TCBUILDROOT) ; fi
	@if [ -f $(CONF) ]; then rm $(CONF) ; fi

clean: distclean
	
PHONY: all base clean
